import './scss/index.scss'
import './common/global'
import i18n from './lang'
import utils from './common/utils'
import componentWraps from './common/componentWraps'

export const sleep = utils.sleep.bind(utils)
export const toast = utils.toast.bind(utils)
export const alert = componentWraps.alert.bind(componentWraps)
export const aos4v = {
    install(app) {
        let loadedModules = import.meta.globEager('./components/*.vue')
        let componentConfigList = Object.values(loadedModules)
        componentConfigList.forEach((componentConfig) => {
            app.component(componentConfig.default.name, componentConfig.default)
        })
        app.use(i18n)
    }
}